#ifndef __CONTROL_H__
#define __CONTROL_H__

#include <iostream>
#include <fstream>

// Forward declarations
namespace cv
{
  class Mat;
}
class SResult;

// Class definition 
class CControl
{
  private:
    unsigned  mScreenX;
    unsigned  mScreenY;
    unsigned  mDistance;
    signed    mN[ 3 ];
    float     mVMax;
    float     mWMax;
    int       mAvoidRotation;

  public:
    CControl( );

    // Generate the control signal
    SResult
    GenerateControlSignal
    (
      const cv::Mat&  rHomography
    , int&            rLeft
    , int&            rRight    
    , std::ofstream&  rFile
    , bool&           rNonFatal
    , double&           ObjectdistanceX
    , double&           ObjectdistanceY
    );

    void
    SmoothControlSignal( int& rLeft, int& rRight, int ClipDiff );

    void SetAlpha( unsigned ScreenX, unsigned ScreenY );

    int& GetAvoidRotation(void);

};


#endif /* __CONTROL_H__ */
